#define  _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<math.h>
int main()
{
	int n;
	double a[2000] = { 0 }, hold = 0;
	double mid = 0;
	scanf("%d", &n);
	for (int i = 0;i < n;i++)
	{
		scanf("%lf", &a[i]);
	}
	for (int i = 1;i < n;i++)
	{
		int flag = 0;
		for (int j = 0;j < n - i;j++)
		{
			if (a[j] > a[j + 1])
			{
				flag = 1;
				hold = a[j];
				a[j] = a[j + 1];
				a[j + 1] = hold;
			}
		}
		if (flag == 0)
			break;
	}
	for (int i = 0;i < n;i++)
	{
		printf("%.0f ", a[i]);
	}
	printf("\n");
	if (n % 2 == 1)
		mid = a[n / 2];
	else
		mid = (a[n / 2] + a[n / 2 - 1]) / 2;
	printf("%.1f\n", mid);
	return 0;
}